home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1997 January / macformat-046.iso / Shareware Plus / Developers / EnterAct / EnterAct Stuff / Documentation / EnterAct in brief < prev    next >
Encoding:
Text File  |  1996-09-09  |  21.8 KB  |  554 lines  |  [TEXT/KEEN]

  1. *********EnterAct in brief (this is not the manual) *************
  2. ____
  3. Last revised: Sept 1996
  4. ____
  5. -----------
  6. Introduction
  7. -----------
  8.  
  9. EnterAct is a full C/C++/Java project-oriented editor, with
  10. additional code definition display capabilities. And then some.
  11.  
  12. Most of EnterAct's best features work with first-draft,
  13. uncompilabe code. As long as the delimiters balance and
  14. the key words are not too badly misspelled, EnterAct will
  15. provide instant definition and prototype display, a class
  16. browser, jumping to definitions, cross-referencing etc.
  17.  
  18. EnterAct typically needs 4-8 Meg for medium to large projects.
  19. (The default 7 Meg partition is recommended for routine work.)
  20. Sorry, that's the price of power. EnterAct is compatible with
  21. Virtual Memory and Ram Doubler™. And more SIMMs/DIMMs.
  22.  
  23. ---------------
  24. Necessary things
  25. ---------------
  26.  
  27. §    Installation
  28. Please see "Installing EnterAct 3/tt". Not much to do, just make
  29. a few aliases and drop them in your EnterAct Stuff folder.
  30.  
  31. §    Adding Java files
  32. Everything for Java files is the same as for C++ files.
  33. For best results, grab the source for the standard java libraries
  34. somewhere (eg CW9) and add it to your project.
  35.  
  36. §    Making a new project
  37. Select "New Project" (this same dialog appears when you start up
  38. EnterAct) and cancel the "Open Project"dialog. Give your project a
  39. name, and save it.
  40.  
  41. In the subsequent "Select <system> Folder..." dialog that appears,
  42. select the folder that holds your system <header> files. If you
  43. have placed EnterAct within a folder that also holds these files,
  44. you can just Cancel. If are leaving EnterAct in its own folder
  45. (the simplest approach) then select your main IDE folder as your
  46. <system> folder. You can drop an alias of your main IDE folder
  47. (eg "Metrowerks CodeWarrior alias") into your EnterAct folder,
  48. and then select the alias as your <system> folder. Please see
  49. "Installing EnterAct 3/tt" for details.
  50.  
  51. The easiest way to add files to your project is to drag files or
  52. folders or aliases onto your project window. When you do this,
  53. all files in subfolders will also be added.
  54.  
  55. Or add files with the "Add Files..." or "Add All in Folder..." commands:
  56. hold down the <Shift> key and the latter becomes "Add All in
  57. Subfolders...". With the "Add All" commands, use the button at the
  58. bottom of the dialog to add whole folders at once (including all
  59. files in subfolders if the <Shift> key was down).
  60.  
  61. Adding all toolbox headers is simplest if you make an alias for
  62. your favorite "Universal Headers" folder, and drag the alias onto
  63. your project window.
  64.  
  65. You can also add toolbox headers with the "Add Mac Headers"
  66. command. Note this adds the right headers only if your <system>
  67. folder contains exactly one copy of the toolbox headers. If you see
  68. a complaint about multiple versions of the toolbox headers, you
  69. can add the toolbox headers by dragging the actual header folder
  70. (or preferably an alias to it) onto your project window.
  71.  
  72. Add as many or as few files as you want, regardless of whether
  73. they make up a complete project. Neglect not non-source files
  74. (spec, design etc) which end up in the rightmost project window
  75. pane. Source files are in the left pane, headers in the middle. To
  76. force files with nonstandard extensions into particular panes, use
  77. "File Extensions...." to enter the selection and pick the pane.
  78.  
  79. Things work best if you include definitions for all the names in
  80. your source code, especially toolbox terms but also PowerPlant or
  81. TCL, ANSI headers, java library source etc. If you make aliases for
  82. these folders and place them in your EnterAct folder, you'll be able
  83. to make new projects easily.
  84.  
  85. NOTE if a folder's name is in parentheses, the files in it will not
  86. be added to your project. To exclude a folder such as "Old Source",
  87. change its name to "(Old Source)".
  88.  
  89. If you add more than one file with the same name, truncated full
  90. path names will appear to the right of the file name, to help you
  91. tell which file is which. (See "Building a project dictionary" just
  92. below to exclude files from being built into your dictionary).
  93.  
  94. The project window responds to many keys in standard ways.
  95. Go left and right across the three panes with the left and right
  96. arrow keys, <Command><down arrow> to go to the bottom of a
  97. pane etc. To type your way to a particular file, you can type
  98. the first part of the name or any distinctive part of the name
  99. (useful if you have a lot of files whose names all begin with the
  100. same prefix, eg to advance to "PROJECT7_Mouse.c" you could
  101. probably type just "mou").
  102.  
  103. You can open a file from your project window by double-clicking
  104. on it, or hitting <Return>, or use "Go to..." with the name selected.
  105. In all cases, the project window itself will go all the way to the back.
  106.  
  107. Please add this file to your project for handy reference (use "Add
  108. Front File"), and add the "EnterAct 3 Manual" as well - eventually,
  109. you'll want to browse through it.
  110.  
  111. §    Building a project dictionary
  112. To exclude a file from being built into your dictionary, hold down
  113. the <Command> key and click on its name in the project window.
  114. A dash '-' will appear to the left of its name, meaning your
  115. dictionary will be "minus" that file.
  116.  
  117. Select "Update Dictionary". If you run into a problem, see
  118. «EnterAct 3 Manual» 132.
  119. (click in the line above and select "Go to..." from the Search menu -
  120. if you've added the manual to your project, this will open the
  121. manual and take you to the line.)
  122.  
  123. Now and then (typically when lookup doesn't give expected
  124. results) issue an "Update Dictionary" to keep your
  125. dictionary current. Your dictionary tracks everything defined
  126. outside of function bodies, so if you add a member to a class
  127. or define a new method, your dictionary will be "out of date".
  128. On a 68040 machine running at 25 Mhz an incremental update
  129. takes about 6 secs, a nice little "mini-break".
  130.  
  131.  
  132. §    Looking up definitions
  133. The AutoLook window is EnterAct's reason for being, so please
  134. try it out!
  135.  
  136. Here are a couple of examples, from PowerPlant code.
  137.  
  138. Double-clicking on "SetPreRecordSelection" (or just clicking after the
  139. name) instantly produces the display shown in the AutoLook window:
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166. Below, a double-click or click after the name "mTextEngine" shows in the
  167. AutoLook window that it's an "LTextEngine", and the complete definition
  168. of LTextEngine is also shown, for those occasions when you actually
  169. want to do something with one:
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196. For any sort of lookup to work, you must have a project with
  197. built dictionary open.
  198.  
  199. Select "AutoLook": when you type or click after or double-click
  200. on a C/C++ or Java name in any window, the AutoLook window
  201. will display its definition. This includes all names for structs,
  202. unions, enums, enum constants, functions, methods, classes, file
  203. or global scope variables, defines, and data members, basically
  204. everything that is defined outside of a function body.
  205.  
  206. The AutoLook window can also display definitions of local
  207. variables. For this to work, the file in question must be a
  208. source file (ie its name must end in .c or cp etc) and if
  209. you've just created a function you should save the file.
  210. Clicking after a local variable name will then produce a
  211. definition in the AutoLook window.
  212.  
  213. AutoLook is less accurate in non-source windows, but it still
  214. works.
  215.  
  216. As of v3.5, AutoLook provides fast extremely accurate lookup for
  217. data member and method names, even in complicated "reference
  218. chains" such as "mObject->SomeMethod().aMember[i].whatsIt"
  219. --just click after any name and the AutoLook window will show
  220. you what it is, or make very good guesses in the rare cases when
  221. the method's context doesn't provide enough scope resolution,
  222. or your spelling is wrong.
  223.  
  224. For a more permanent separate display of the definition, press the
  225. <Enter> key. A separate lookup window will appear. Hold down the
  226. <Option> key and drag in the lookup window's title bar to select the
  227. exact definition you want from a popup menu. Note that local
  228. variables are at present excluded, you'll have to Copy and Paste
  229. from the AutoLook window if you want a separate view of them.
  230. (Tip: for local variables, click after the type name for the variable
  231. in the AutoLook window, and press <Enter> to create a more
  232. permanent display of the definition in a separate lookup window.)
  233.  
  234. To look up the struct or class containing a particular member,
  235. again double-click on or click to the right of the name, and press
  236. <Shift><Enter>. A lookup window will appear, holding struct or
  237. class definitions that contain the member. There will often be
  238. several, so use the lookup window's popup menu as described just
  239. above to pick the one you want. The AutoLook window
  240. will usually display the definition you want as soon as you click
  241. to the right of the name, so this isn't much needed unless you
  242. want a separate display of the definition.
  243.  
  244. To use EnterAct as a lookup aid while working mainly with
  245. some other editor: have a relevant EnterAct project open,
  246. dictionary built, AutoLook open and frontmost; in the other
  247. editor, Copy the term you want looked up, and switch to
  248. EnterAct. If the definition does not immediately appear in
  249. the AutoLook window, press <Commmand><Enter>. If it was
  250. a member name and you want the full definitions of the containing
  251. structs or classes, press <Shift><Command><Enter>.
  252.  
  253. All lookup windows including AutoLook are fully editable but
  254. cannot be saved.
  255.  
  256. §    Browsing
  257. Select "Browse" from the EnterAct menu. Browse as in THINK C.
  258. Click and <Shift>click on and off of class names to show/hide
  259. multiple inheritance lines. (As mentioned, class browsing works
  260. with first-draft code.)
  261.  
  262. To view a particular class, type the first part or some distinctive
  263. part of its name. 
  264.  
  265. You can also use the Find dialog and the Find Again command to
  266. find classes in the browser window (eg if you're looking at the
  267. source for a class and want to see where the class is in the
  268. browser, use Enter Selection to enter the class name in the Find
  269. dialog, then bring the browser to the front and do a Find Again).
  270.  
  271. "User" class names are underlined, <system> class names are not.
  272.  
  273. If a class "uses" or "has" member classes, these will be listed
  274. below the main class name, separated from it by a white line.
  275. You can also double-click on these names to jump to their
  276. definitions, or click-and-hold to select one of their method
  277. names from a popup.
  278.  
  279. The multiple inheritance lines often aren't enough, so if you
  280. <Option> click on a class name you'll see a popup
  281. listing all of the classes from which it is derived. If you let
  282. go the mouse while over one of these base class names you'll
  283. jump to its definition.
  284.  
  285. If you <Command> click on a class name the resulting popup
  286. will show not only all methods in the class but all methods it
  287. inherits. Note if it's an ENORMOUS list of methods, it make take
  288. 5 seconds for the popup to show-please be patient the first
  289. few times you try this.
  290.  
  291. In all method popups, virtual methods are marked with a "v" so
  292. you can tell at a glance if a method wants or needs or has an
  293. override.
  294.  
  295. Summary of class popups:
  296.     • click on a class name: all methods defined by the class
  297.     • <Command> click: all inherited methods too
  298.     • <Option> click: the immediate parents of a class.
  299.  
  300.     Finding Definitions
  301. Single words: <Option>double-click.
  302.  
  303. Full method names (eg "TCircle::Draw") : select the full name
  304. and use "Find Definition". Or, <Option>double-click on one word,
  305. drag to the other, and release.
  306.  
  307. Just the method name (eg "Draw") :  normally the AutoLook
  308. window will show just the one you want, but even if it
  309. show several you can jump to it by <Option>double-clicking
  310. on the full method name in the AutoLook window.
  311.  
  312. If the AutoLook window doesn't show the one you want,
  313. press <Enter>; a lookup window appears holding full
  314. prototypes for all methods with that name; use the lookup
  315. window's popup menu to pick the one you want; then jump
  316. to it as described above for full method names.
  317.  
  318. More than one definition for a term: 
  319. press <Enter> to look the name up; use the popup menu in the
  320. lookup window to pick the definition you want (<Option> click
  321. in the window's title bar); and then use <Option>double-click on
  322. the name, or "Find Definition" without changing the default
  323. selection. The popup menu includes truncated full path names
  324. for the defining files, so you can tell which definition is which.
  325.  
  326. Static functions and variables: if you're in the file where it is
  327. defined, just <Option>double-click on the name. If you have
  328. several definitions of such a name and you aren't in the file where
  329. it is defined, use the approach for more than one definition described
  330. just above.
  331.  
  332. §    Multi-file search
  333. The Find dialog contains buttons to select all files of a particular
  334. type in the project window. Files selected for multi-file
  335. operations (including searching) have bullets (•) to their left in
  336. the project window. To "fine tune" your multi-file selection, hold
  337. down the <Option> key and click or drag right in the project
  338. window.
  339.  
  340. The "Batch" check box allows you to generate a list of all lines
  341. where the search string can be found in your multi-file selection
  342. (the "Find In Next File" button in the Find dialog changes to read
  343. "Batch Find"). To jump to the file and line indicated for one of the
  344. finds that's shown in the result window, click on the line and
  345. use "Go to...".
  346.  
  347. Multi-file selections have other uses, such as "Remove •'d files",
  348. input for several "Index" commands, and input for hAWK programs
  349. (see the «hAWK User’s Manual»).
  350.  
  351. Placing a dash '-' beside a project file name indicates that it
  352. should be excluded when building your dictionary, but it's often
  353. the case that you don't want to search those files either.
  354. In the Find dialog, the "Skip '-'" checkbox allows you to exclude
  355. files marked with a dash '-' in the project window when doing
  356. a multi-file operation such as searching.  Please note this
  357. checkbox affects all other buttons in the Find dialog, and all
  358. operations done with the file list. Specifically, the All and
  359. None buttons don't touch files marked with a dash '-' if the
  360. "Skip '-'" checkbox is checked, and such files aren't passed to
  361. a hAWK program, or looked at when you click "Find In Next File".
  362.  
  363. The "Dual Batch Find" button in the Find dialog calls up a separate
  364. (modal alas) dialog that lets you search for two search strings
  365. that occur within a certain number of lines or characters of each
  366. other. Clicking OK fires off a search of your bulleted files, with
  367. results of the search presented in a text window. "Zero" lines
  368. means on the same line, and a separation of zero characters means
  369. the two strings must occur together with no characters between
  370. (as in "Cmd" and "Handle" matching "CmdHandle" or "HandleCmd").
  371. Dual Batch Find obeys your "Match Words" and "Ignore Case"
  372. settings in the main Find dialog.
  373.  
  374. §    Accessing THINK Reference
  375. Beside EnterAct at the same level, have a folder entitled "Tools"
  376. or "(Tools)"; drop an alias of THINK Reference in this folder.
  377.  
  378. To look up THINK Ref's thoughts on a term, select it or click
  379. to the right of it and issue "Find in THINK Reference" (<cmd><->).
  380.  
  381. §    Accessing Toolbox Assistant
  382. As for THINK Ref, but drop an alias of "QuickView" in your
  383. Tools folder. The "Find in Toolbox Assistant" command is
  384. at the bottom of the Search menu (<cmd><4>).
  385.  
  386. §    Editing and Undo
  387. All basic editing commands are undoable, with a single level
  388. of undo. This includes Replace All.
  389.  
  390. You can drag and drop text in the usual way. You can also paste
  391. and delete PICTs to illustrate your documents -- search for
  392. "Illustrating your text" in the «EnterAct 3 Manual».
  393.  
  394. As you work, EnterAct logs all of your activities (including
  395. contents of edits) to the "EnterAct Recent Activities" file. In a
  396. pinch, you can recover the contents of a delete or remind yourself
  397. of what you just did by selecting "Show Activities..." from
  398. the Edit menu.
  399.  
  400. Well, not all of your activities, only the last ten thousand.
  401.  
  402. See «EnterAct 3 Manual» 4600 for a new and nicer way to cut
  403. and paste blocks of code. (To go there: add this file and the
  404. EnterAct 3 Manual to an EnterAct project, then click anywhere
  405. in the first line of this paragraph and use the "Go to" command,
  406. uner the Search menu).
  407.  
  408. §    Working with Code Warrior
  409. By default, when you open a document and Code Warrior also has
  410. the document open, EnterAct will force Code Warrior to close and
  411. save the file before opening it, asking you first of course before
  412. doing so. To turn this off, deselect the "Safe switching under
  413. MultiFinder" option in the Options... dialog (under the Edit menu).
  414. Having this option on also means that EnterAct will save all your
  415. documents when you switch out, and refresh them from disk
  416. when you switch back if they have been changed by some other
  417. application.
  418.  
  419. §    The Locations Menu
  420. Select "Add Current Location" to add a sort of "global marker" to
  421. the Locations menu for your current location. This is project
  422. independent, though note the position will not be maintained
  423. if you edit the corresponding source file with another editor.
  424. The text you have selected when you use the Add Current Locations
  425. command will be entered as the default name of the position in
  426. the dialog that subsequently appears: you can edit this name, or
  427. use no name at all and EnterAct will make up a name for you.
  428.  
  429. To remove a location from this menu:
  430.     • go to the location (typically by picking it from the Locations menu)
  431.     • select Delete Current Location from the Locations menu.
  432.  
  433. If the location does not exist any more, when you pick it from
  434. the Locations menu you will be told it can't be found, and asked if
  435. you want to delete it from the menu.
  436.  
  437. You can have up to 10 different locations under this menu.
  438.  
  439. §    Code Templates
  440. Great fun. All templates are stored in the text file "EnterAct
  441. Code Templates", which is very easy to modify (please take a look
  442. at it). Add this file to the folder where you keep EnterAct, at the
  443. same level.
  444.  
  445. To use a template, you type its name and press <command><return>.
  446. And <command><return> will also advance you to the next logical
  447. insertion point in your template (or in any code for that matter). If
  448. you save changes to your "EnterAct Code Templates" file using
  449. EnterAct, your new templates are instantly available (no need to
  450. quit and restart). Templates don't have to contain code, and
  451. template names can contain any non-blank characters, not just
  452. letters and numbers.
  453.  
  454. Each entry has the form
  455. ____
  456. ENTRY
  457. entry_name
  458. arbitrary text
  459.     making up the definition
  460. of the entry
  461. END
  462. ____
  463.  
  464. For the complete details on code templates, see the top of
  465. the "EnterAct Code Templates" file. If you'd like to try one
  466. now and you're using EnterAct, open a new window and type
  467. ____
  468. html<command><return>
  469. ____
  470.  
  471. Keep all your entries flush-left, and EnterAct will adjust your
  472. indentation when pasting your template in. Just open up a new line
  473. and tab in to the right position before typing the entry name and
  474. pressing <command><return>.
  475.  
  476. Tip: add "EnterAct Code Templates" to your "Locations" menu so you
  477. can change your templates on the fly.
  478.  
  479. -----------------
  480. Other useful things
  481. -----------------
  482. You can Balance a delimiter by double-clicking on it.
  483.  
  484. EnterAct comes equipped with hAWK, a version of AWK. It really
  485. is "three clicks and Run", with many supplied programs. See the
  486. «hAWK User’s Manual» for details. You can also fire off a hAWK
  487. program by using a command line, and you can save the command
  488. line as a "code template" in the "EnterAct Code Templates" file.
  489. If you'd like to try one now and have fully installed EnterAct,
  490. open up a new window and type the word "time", then hit
  491. <command><return> twice. The first <command><return> expands
  492. "time" into a hAWK command line, and the second <command><return>
  493. runs the corresponding hAWK program. Neat, eh?
  494.  
  495. EnterAct's <Enter>-driven lookup tolerates many kinds of spelling
  496. and (more importantly) memory errors. When in doubt, give it your
  497. best guess and press <Enter>. For extreme cases, use the "Options"
  498. dialog to increase the "Number of entries per lookup window" to 20.
  499. For emergency use only, use <Option><Enter> instead of plain <Enter>
  500. to fire up EnterAct's most error tolerant definition retriever - be
  501. prepared for some wild guesses mixed in there with the good ones!
  502.  
  503. To look up the last word on the clipboard, typically copied while in
  504. another application, press <Command><Enter>. Note if you have
  505. the AutoLook window open it will automatically show a definition
  506. for a word on the clipboard as you switch back to EnterAct.
  507.  
  508. "Go to..." is very general. It accepts line numbers, file names, marker
  509. names, and combinations such as file name/marker name, file
  510. name/line number. Handy for placing references in code files to
  511. supporting documentation. Moderately error tolerant, full correct
  512. spelling not required. To see it work, add the "EnterAct 3 Manual" to
  513. your project if you haven't done so, then click anywhere on the
  514. following line and "Go to":
  515. «EnterAct 3 Man» «17   “Go” cmds»
  516.  
  517. The European-style quotes «» are helpful in most "Go to" link names;
  518. to generate these painlessly, see
  519. «EnterAct 3 Man»  6438 (any individual mark)
  520. and
  521. «EnterAct 3 Man» 8151 (marks in documentation files especially)
  522.  
  523. To open an included file, click on the line in your source where it's
  524. included and use "Go to".
  525.  
  526. EnterAct projects accept PICT files.
  527.  
  528. Printing doesn't clip off long lines, it wraps them around.
  529.  
  530. EnterAct can be used as the THINK Project Managers's editor,
  531. as explained in either the THINK or EnterAct manuals.
  532.  
  533. When EnterAct can't locate a project file, and you have enabled
  534. the "Relocate files automatically" option,  it starts searching
  535. at the top of the disk where the file was last seen and
  536. searches down until it finds it (or not). Renaming or moving
  537. a folder does not affect EnterAct's memory of where a file is.
  538. Activating the "Relocate files automatically" option is NOT
  539. recommended, unless you're absolutely sure all your files
  540. have unique names.
  541.  
  542. If you have favorite AppleScripts to compile projects etc, drop
  543. them in the (EnterAct Scripts) folder for easy access.
  544. The scripts must be compiled scripts, not just text-only.
  545. They should do something simple and straightforward, and then
  546. quit, since you won't be able to continue working in EnterAct
  547. until the script finishes.
  548.  
  549. That's more than enough to get going. If you become inordinately
  550. fond of EnterAct's definition lookup capabilities, be sure to read
  551. through the full manual for details on the above features and a
  552. host of others.
  553.  
  554.